import axios from "axios";
let base = "/manage";

axios.interceptors.request.use(config => {
  return config;
});

axios.interceptors.response.use(
    response => {
    return response;
  },
  err => {
    return err;
  }
);

export const postRequest = (url, data, type) => {
  return axios({
    method: "post",
    baseURL: base,
    url,
    data: data,
    timeout: 20000,
    headers: {
      "Content-Type": type
    }
  });
};
